package com.sduept.zj103.model;

import java.util.Date;

public class LbFile {
    public String fileName;
    public Date faultTime;
    public int fileType;
    public int fileSize;
    public byte[] data;

    public static final int HDR_TYPE = 1;
    public static final int CFG_TYPE = 2;
    public static final int DAT_TYPE = 3;
    public static final int INF_TYPE = 4;
    public static final int TXT_TYPE = 10; //录波简报
    public static final int SHW_TYPE = 11; //深圳双合
    public static final int XML_TYPE = 241; //新的录波简报类型

    public static final int COT_14 = 0x14; //一般命令的肯定认可
    public static final int COT_15 = 0x15; //一般命令的否定认可，表示和录波器通信中断
    public static final int COT_18 = 0x18; //稳态录波文件

    static public String getTypeDesc(int type) {
        String rel = "";
        switch (type) {
            case HDR_TYPE:
                rel = "hdr";
                break;
            case CFG_TYPE:
                rel = "cfg";
                break;
            case DAT_TYPE:
                rel = "dat";
                break;
            case INF_TYPE:
                rel = "inf";
                break;
            case TXT_TYPE:
                rel = "txt";
                break;
            case  SHW_TYPE:
                rel = "shw";
                break;
            case XML_TYPE:
                rel = "xml";
                break;
            default:
                rel = type + "";
                break;
        }

        return rel;
    }
}
